<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:c2="http://java.sun.com/jstl/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core">


<rich:toolbar id="tb"  itemSeparator="square" height="40px"> 

<h:outputText value="Select : "/>

		<c:forEach var="dropDownMenu" items="#{menuBar.dropDownMenus}">
	
		
		   <rich:dropDownMenu direction="bottomRight" hideDelay="0" horizontalOffset="0" mode="ajax">
				<f:facet name="label">
		           <h:outputText value="#{dropDownMenu.nom}" styleClass=""/>
		       </f:facet>
	
		       <c:forEach var="menuItem" items="#{dropDownMenu.menuItems}" >
	
			   <c:if test="#{menuItem.esFulla}">
					<rich:menuItem label="#{menuItem.nom2}" action="#{menu.doAccio}" 
						render="seleccio,seleccio2"  styleClass="search" execute="@form">
						<f:param name="opcio" value="#{menuItem.abrev2}" />
					</rich:menuItem>
				</c:if>
				
				<c:if test="#{not menuItem.esFulla}">
				
					 <rich:menuGroup label="#{menuItem.nom2}">
					  	<c:forEach var="menuItem2" items="#{menuItem.menuItems}" >
        					<rich:menuItem label="#{menuItem2.nom3}" action="#{menu.doAccio}"
        					render="seleccio,seleccio2" execute="@form">
        						<f:param name="opcio" value="#{menuItem2.abrev3}" />
        					</rich:menuItem>
        				</c:forEach>	
					 </rich:menuGroup>
				</c:if>
		
				</c:forEach>
						
		</rich:dropDownMenu>
		</c:forEach>
		
		
		 <rich:toolbarGroup location="right">
                <rich:dropDownMenu value="Search" mode="ajax" direction="bottomLeft" jointPoint="topRight" styleClass="search">
                    <rich:menuItem submitMode="none">
                        <h:inputText value="" id="searchinput"/>
                        
                        <a href="#">
                        <img src="images/93.png" border="0"/>
                        </a>
                      
                    </rich:menuItem>
                    <rich:menuItem value="Criterio de búsqueda" disabled="true"></rich:menuItem>
                </rich:dropDownMenu>
            </rich:toolbarGroup>

		
	</rich:toolbar>
	

</ui:composition>



